package cn.wyj.basic.controller;

import cn.wyj.basic.deo.PhoneSmsCodeDto;
import cn.wyj.basic.service.IRegisterService;
import cn.wyj.basic.util.AjaxResult;
import cn.wyj.org.domain.PhoneRegisterDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@RestController
@RequestMapping("/register")
public class RegisterController {

    @Autowired
    private IRegisterService registerService;
    /**
     * 手机号注册
     *
     */
    @PostMapping("/phone")
    public AjaxResult phoneRegister(@RequestBody @Valid PhoneRegisterDto dto){

        registerService.phoneRegister(dto);

        return AjaxResult.me().success();
    }
}
